import request from '@/utils/request'

export function getUserRoleList(token, params) {
  return request({
    url: '/system/role/listAll',
    method: 'post',
    data: params
  })
}

export function getRoleList(token, params) {
  return request({
    url: '/system/role/list',
    method: 'post',
    data: params
  })
}

export function addRole(token, params) {
  return request({
    url: '/system/role/add',
    method: 'post',
    data: params
  })
}

export function updateRole(token, params) {
  return request({
    url: '/system/role/update',
    method: 'post',
    data: params
  })
}

export function getSingleRole(token, params) {
  return request({
    url: '/system/role/selectByPrimaryKey',
    method: 'post',
    data: params
  })
}

export function deleteRole(token, params) {
  return request({
    url: '/system/role/delete',
    method: 'post',
    data: params
  })
}

